
import request from '@/utils/request'

// 查询指令配置列表
export function listAlarmRule(query) {
  return request({
    url: '/comlbs/alarmRule/list',
    method: 'get',
    params: query
  })
}

// 查询指令配置详细
export function getAlarmRule(id) {
  return request({
    url: '/comlbs/alarmRule/' + id,
    method: 'get'
  })
}

// 新增指令配置
export function addAlarmRule(data) {
  return request({
    url: '/comlbs/alarmRule',
    method: 'post',
    data: data
  })
}

// 修改指令配置
export function updateAlarmRule(data) {
  return request({
    url: '/comlbs/alarmRule',
    method: 'put',
    data: data
  })
}

// 删除指令配置
export function delAlarmRule(id) {
  return request({
    url: '/comlbs/alarmRule/' + id,
    method: 'delete'
  })
}

// 报警规则绑定围栏列表
export function getfenceOrLinedata(query) {
  return request({
    url: '/comlbs/alarmRuleFence/list',
    method: 'get',
    params: query
  })
}

// 报警规则绑定围栏
export function savefenceOrLine(data) {
  return request({
    url: '/comlbs/alarmRuleFence',
    method: 'post',
    data: data
  })
}
// 报警规则绑定监管对象列表
export function getCarList(query) {
  return request({
    url: '/comlbs/alarmRulePersonVehicle/list',
    method: 'post',
    data: query
  })
}

// 报警规则绑定监管对象
export function saveCarData(data) {
  return request({
    url: '/comlbs/alarmRulePersonVehicle',
    method: 'post',
    data: data
  })
}
